﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.ComponentModel;

namespace BusinessObjects {
  /// <summary>
  /// Person
  /// </summary>
  public abstract class Person : ObjectBase {

    private string name, firstName, phone, gsm, email, nationalNumber;
    private Address address;
    private Image photo;
    private int id;

    #region - Properties -

    /// <summary>
    /// Gets or sets the id.
    /// </summary>
    /// <value>
    /// The id.
    /// </value>
    public int Id {
      get { return id; }
      set { id = value; }
    }

    /// <summary>
    /// Gets a value indicating whether this instance is new.
    /// </summary>
    /// <value>
    ///   <c>true</c> if this instance is new; otherwise, <c>false</c>.
    /// </value>
    public bool IsNew {
      get {
        if ( Id==0 ) {
          return true;
        } else {
          return false;
        }
      }
    }

    /// <summary>
    /// Gets or sets the name.
    /// </summary>
    /// <value>
    /// The name.
    /// </value>
    public string Name {
      get { return name; }
      set {
        SetField( ref name, value, "Name" );
      }
    }

    /// <summary>
    /// Gets or sets the first name.
    /// </summary>
    /// <value>
    /// The first name.
    /// </value>
    public string FirstName {
      get { return firstName; }
      set {
        SetField( ref firstName, value, "FirstName" );
      }
    }

    /// <summary>
    /// Gets or sets the national number.
    /// </summary>
    /// <value>
    /// The national number.
    /// </value>
    public string NationalNumber {
      get { return nationalNumber; }
      set {
        SetField( ref nationalNumber, value, "NationalNumber" );
      }
    }

    /// <summary>
    /// Gets or sets the email.
    /// </summary>
    /// <value>
    /// The email.
    /// </value>
    public string Email {
      get { return email; }
      set {
        SetField( ref email, value, "Email" );
      }
    }

    /// <summary>
    /// Gets or sets the GSM.
    /// </summary>
    /// <value>
    /// The GSM.
    /// </value>
    public string Gsm {
      get { return gsm; }
      set {
        SetField( ref gsm, value, "Gsm" );
      }
    }

    /// <summary>
    /// Gets or sets the phone.
    /// </summary>
    /// <value>
    /// The phone.
    /// </value>
    public string Phone {
      get { return phone; }
      set {
        SetField( ref phone, value, "Phone" );
      }
    }

    /// <summary>
    /// Gets or sets the photo.
    /// </summary>
    /// <value>
    /// The photo.
    /// </value>
    public Image Photo {
      get { return photo; }
      set {
        SetField( ref photo, value, "Photo" );
      }
    }

    /// <summary>
    /// Gets or sets the address.
    /// </summary>
    /// <value>
    /// The address.
    /// </value>
    public Address Address {
      get { return address; }
      set { address = value; }
    }

    #endregion

  }
}
